{\rtf1\ansi\ansicpg936\cocoartf2513
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 CREATE TABLE `tasks` (\
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\
  `description` text COLLATE utf8mb4_unicode_ci NOT NULL,\
  `run_count` int unsigned NOT NULL DEFAULT '0',\
  `created_at` timestamp NULL DEFAULT NULL,\
  `updated_at` timestamp NULL DEFAULT NULL,\
  PRIMARY KEY (`id`)\
)\
\
CREATE TABLE `actions` (\
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\
  `task_id` bigint unsigned NOT NULL,\
  `created_at` timestamp NULL DEFAULT NULL,\
  `updated_at` timestamp NULL DEFAULT NULL,\
  PRIMARY KEY (`id`),\
  KEY `actions_task_id_foreign` (`task_id`),\
  CONSTRAINT `actions_task_id_foreign` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE\
)\
\
CREATE TABLE `operations` (\
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,\
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,\
  `element` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',\
  `object` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',\
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',\
  `degree` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',\
  `action_id` bigint unsigned NOT NULL,\
  `created_at` timestamp NULL DEFAULT NULL,\
  `updated_at` timestamp NULL DEFAULT NULL,\
  PRIMARY KEY (`id`),\
  KEY `operations_action_id_foreign` (`action_id`),\
  CONSTRAINT `operations_action_id_foreign` FOREIGN KEY (`action_id`) REFERENCES `actions` (`id`) ON DELETE CASCADE\
)}